#include <stdio.h>
#include <string.h>
#include "bulk_mem_copy.h"

void print_bytes(const unsigned char *data, int len) {
    for (int i = 0; i < len; ++i) {
        printf("%02c", data[i]);
    }
    printf("\n");
}

int main() {
    unsigned char buffer[60] = "Hello, this is a memory test.";
    
    printf("Before copy:\n");
    print_bytes(buffer, 29);

    /* 测试重叠区域，from 在 to 前面 */
    bulk_mem_copy(buffer + 5, buffer, 29);

    printf("After copy (overlap):\n");
    print_bytes(buffer + 5, 29);

    return 0;
}
